Conversation
|
|
||
| export const FUNCTION_SELECTOR_NUM_BYTES = 4; | ||
|
|
||
| export const MAPPING_SLOT_PEDERSEN_SEPARATOR = 4; |
Contributor
There was a problem hiding this comment.
is there a place perhaps from cpp/bberg from where we are getting this value from? Maybe add a link to that there if in future we change this
Member
Author
There was a problem hiding this comment.
is from the constants.hpp file that this file already shadows
| } | ||
|
|
||
| // Create a commitment to the amount | ||
| let note = TransparentNote::new(amount, secretHash); |
Contributor
There was a problem hiding this comment.
if current_sender_balance < amount, we still seem to create a note?
|
|
||
| let thisAddress = inputs.call_context.storage_contract_address; | ||
| let mut args = [0; abi::MAX_ARGS]; | ||
| // addUnshieldedBalance selector (in decimal) |
Contributor
There was a problem hiding this comment.
add a comment on how to calculate this easily plisssssss
LHerskind
approved these changes
Jul 5, 2023
Contributor
LHerskind
left a comment
There was a problem hiding this comment.
Minor stuff, would be neat to fix the loops but looks good.
| context.finish() | ||
| } | ||
|
|
||
| // Shield creates a way for a user to move tokens from the public context into the private context. |
| hash_bytes[322] = callerOnL1_bytes[30]; | ||
| hash_bytes[323] = callerOnL1_bytes[31]; | ||
|
|
||
| for i in 0..32 { |
Contributor
There was a problem hiding this comment.
As in #915 it don't need as many separate loops.
| let deadline_bytes = (self.deadline as Field).to_be_bytes(32); | ||
| let fee_bytes = (self.fee as Field).to_be_bytes(32); | ||
|
|
||
| for i in 0..32 { |
Contributor
There was a problem hiding this comment.
Same as before with the loops.
| NODE_OPTIONS=--no-warnings yarn ts-node --esm src/scripts/copy_output.ts $CONTRACT_NAME | ||
|
|
||
| echo "Formatting" | ||
| yarn run -T prettier -w ./src/examples/$CONTRACT_FOLDER.json |
| } | ||
|
|
||
| // Create a commitment to the amount | ||
| let note = TransparentNote::new(amount, secretHash); |
rahul-kothari
approved these changes
Jul 5, 2023
This was referenced Jul 25, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
An issue has recently been fixed in the compiler that allows us to create more granular libs.
This pr migrates noir to use a library structure, creates two new ones,
custom_notesandtoken_utils, removes code duplication and moves noir-aztec into the libs foldercontains a tiny bit of code shuffle ripped from here: #915 this was originally part of this pr but ive broken it up for easier review
Checklist: